<?php
namespace Home\Controller;
use Think\Controller;
class DomeController extends Controller {
    public function index(){
		
      	$uid=session('uid');
		$re=M('dome')->where('uid="'.$uid.'"')->find();
		$this->assign('list',$re);
		$this->display('dome');
    }
	
	public function pvq(){
		$uid=session('uid');
		$re=M('dome')->where('uid="'.$uid.'"')->find();
		
		if($re){	
		$this->assign('list',$re);
		$this->display('dome');
		}else{
      	 $this->display();
		}
    }
	 
	 public function dome(){
       $uid=session('uid');
	   $cx=I('cx');
	  
	   $data=array(
					'uid'=>$uid,
					'cx'=>$cx,
			);
				
		$res=M('dome')->data($data)->add();	
		if($res){
			$this->redirect('Dome/index');		
		}		
    }
	
}